home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Education
/
PC-SiG's World of Education.iso
/
run
/
2602
/
plotstok.alg
< prev
next >
Wrap
Text File
|
1990-08-12
|
1KB
|
37 lines
{ PLOTSTOK - DAN algorithm to track stock activity }
step = 7;
file = "EG&G.DAT"; {set name of file containing quotes}
volume = read & {convert data from ASCII text file to binary files}
high = read &
low = read &
close = read &
sigma1 = std.dev(close) & ymax = max(high) & ymin = min(low);
constant(sigma1);
xformat = dates;
{ plot stock value }
label="EG&G Corp. stock value - high, low, close";
ylabel = "Dollars";
tracenum = off;
trace = block & plot(high) & plot(low) &
trace = line & plot(close) & connect(t,high,t,low);
text="EG&G Corp. stock value standard deviation: "; note(sigma1,#8/1/85,44);
pause;
{plot stock volume}
erase;
ymin = 0; ymax = max(volume) & sigma2 = std.dev(volume);
constant(sigma2);
label = "EG&G Corp. trading volume";
ylabel = "Number of Shares / 1000";
plot(volume);
text="EG&G Corp. trading volume standard deviation: "; note(sigma2,#8/1/85,7000);
pause;
{ plot portfolio value }
file = "numEG&G.dat"; { file containing number of shares owned }
num_share = read;
ymin = min(num_share * close) & ymax = max(num_share * close);
erase;
start = #10/1/84; dur = #10/1/86 - #10/1/84;
label = "EG&G Portfolio Value";
ylabel = "Dollars";
plot(num_share * close);